package com.gamehouse.eggpoacher;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class myHelp extends Activity{
	

	TextView textView;
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
            WindowManager.LayoutParams.FLAG_FULLSCREEN );
	setContentView(R.layout.help);
	

	ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1);

	
	textView = (TextView) findViewById(R.id.textViewHelp_description);
	String eggsDescription = "";
	
	DataBaseAdapter db = new DataBaseAdapter(this);
	 db.open();
	 Cursor c = db.getAEggNameAndPoints();
       if (c.moveToFirst())
       {
       	do {  
       		eggsDescription += c.getString(1) + ":  " + c.getInt(0) + "\n\n"; 
       		//adapter.add(" - " + c.getString(1) + ":  " + c.getInt(0));
       	} while (c.moveToNext());
       	}
    c.close();
    db.close();
	textView.setText(textView.getText() + "\n\n" + eggsDescription);
				
	}
	
	public void mostrarMenu(View view){
		//Intent myIntent = new Intent(view.getContext(), myMenu.class);
		//startActivityForResult(myIntent, 0);
		finish();
	}
}
